二叉树的镜像 Posted on 2019-08-23 | In 剑指offer | | reads times 二叉树的镜像题目描述 操作给定的二叉树,将其变换为源二叉树的镜像。 递归。。。 123456789function Mirror(root){ // write code here if(root===null)return; Mirror(root.left); Mirror(root.right); [root.left,root.right]=[root.right,root.left]; return root;} Post author: GoldMiner Xun Post link: https://goldminerxun.github.io/2019/08/23/%E5%89%91%E6%8C%87offer%20JavaScript%E7%89%88%20(18)/ Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.